package com.fengjue.userservice.failback;

import com.fengjue.userservice.entity.Product;
import com.fengjue.userservice.feignclient.ProductClient;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;


@Component
public class ProductClientFallBack implements ProductClient {
    @Override
    public String showMsg() {
        return "当前服务已被降级";
    }
    @Override
    public Map<String, Object> findOne(String productId) {
        Map<String,Object> result = new HashMap<>();
        result.put("msg","当前findOne服务不可用");
        return result;
    }
    @Override
    public Map<String, Object> update(Product product) {
        Map<String,Object> result = new HashMap<>();
        result.put("msg","当前update服务不可用");
        return result;
    }
}
